﻿<UserControl x:Class="VAdvantage.Apps.AForms.VMatch"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="424" d:DesignWidth="499" xmlns:my="clr-namespace:SLControls.Controls;assembly=SLControls" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" xmlns:my1="clr-namespace:VAdvantage.Controls">
    <Grid>
        <Grid x:Name="LayoutRoot" Background="White" Height="Auto" Width="Auto">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="Auto" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Border Margin="5,5,5,5" Grid.Column="0" Grid.ColumnSpan="7" Grid.Row="0" Grid.RowSpan="3" BorderThickness="0.8" BorderBrush="#BDAAB1B1">
            <Grid Name="vdgvInnerGrid" Grid.Column="0" Grid.ColumnSpan="7" Grid.Row="0" Grid.RowSpan="3" Margin="5,5,5,5">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <my:VComboBox Grid.Column="1" Height="22" Name="vcmbMatchFrom" VerticalAlignment="Top" Width="Auto" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" SelectionChanged="vcmbMatchFrom_SelectionChanged" Margin="0,0,5,0" />
            <my:VComboBox Height="Auto" HorizontalAlignment="Stretch" Name="vcmbMatchTo" VerticalAlignment="Stretch" Width="Auto" Grid.Column="3" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" SelectionChanged="vcmbMatchTo_SelectionChanged" Margin="0,0,5,0" />
            <my:VComboBox Height="Auto" HorizontalAlignment="Stretch" Name="vcmbMatchMode" VerticalAlignment="Stretch" Width="Auto" Grid.Column="6" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" Margin="0" Grid.Row="0" />
            <my:VCheckBox Content="Return Transaction" Grid.Column="5" Grid.Row="1" Height="Auto" HorizontalAlignment="Stretch" Margin="0,5,5,0" Name="vchkIsReturnTrx" VerticalAlignment="Center" Width="Auto" Grid.RowSpan="1" HorizontalContentAlignment="Stretch" Grid.ColumnSpan="1" />
            <my:VLabel Height="Auto" HorizontalAlignment="Stretch" Name="vlblMatchFrom" VerticalAlignment="Stretch" Width="Auto" Content="MatchForm" HorizontalContentAlignment="Left" Margin="0,0,5,0" Grid.ColumnSpan="1" />
            <my:VLabel Grid.RowSpan="1" Height="Auto" HorizontalAlignment="Stretch" Margin="0,0,5,0" Name="vlblMatchMode" VerticalAlignment="Stretch" Width="Auto" Grid.Column="4" Grid.Row="0" Content="SearchMode" HorizontalContentAlignment="Left" />
            <my:VLabel Height="Auto" HorizontalAlignment="Stretch" Margin="0,0,5,0" Name="vlblMatchTo" VerticalAlignment="Stretch" Width="Auto" Grid.Column="2" Content="Match To" HorizontalContentAlignment="Left" />
            <my:VLabel Height="Auto" HorizontalAlignment="Stretch" Margin="0,5,5,0" Name="vlblDateFrom" VerticalAlignment="Stretch" Width="Auto" Grid.Column="0" Grid.Row="3" Grid.RowSpan="1" Content="DateFrom" HorizontalContentAlignment="Left" />
            <my:VLabel Grid.RowSpan="1" Height="Auto" HorizontalAlignment="Stretch" Margin="0,5,5,0" Name="vlblDateTo" VerticalAlignment="Stretch" Width="Auto" Grid.Column="2" Grid.Row="3" Content="Date To" HorizontalContentAlignment="Left" />
            <my:VLabel Content="Business Partner" Height="Auto" HorizontalAlignment="Stretch" Name="vlblBPartner" VerticalAlignment="Stretch" Width="Auto" Grid.Column="0" Grid.Row="1" HorizontalContentAlignment="Left" Margin="0,5,5,0" />
            <my:VLabel Content="Product" Height="Auto" HorizontalAlignment="Stretch" Margin="0,5,5,0" Name="vlblProduct" VerticalAlignment="Stretch" Width="Auto" Grid.Column="2" Grid.Row="1" Grid.RowSpan="1" HorizontalContentAlignment="Left" />
            <my:VDateTimePicker Grid.Column="1" Grid.Row="3" HorizontalAlignment="Stretch" Name="vdtpFrom" VerticalAlignment="Center" Width="Auto" Margin="0,5,5,0" HorizontalContentAlignment="Stretch" />
            <my:VDateTimePicker HorizontalAlignment="Stretch" Name="vdtpTo" VerticalAlignment="Center" Width="Auto" Grid.Column="3" Grid.Row="3" Margin="0,5,5,0" HorizontalContentAlignment="Stretch" />
            <my:VImage Content="Search" Grid.Column="5" Grid.Row="3" Height="23" HorizontalAlignment="Right" Name="vbtnSearch" VerticalAlignment="Center" Width="66" Click="vbtnSearch_Click" Margin="0,5,0,0" Padding="0" VerticalContentAlignment="Center" />
        </Grid>
</Border>

        <my:VLabel Height="Auto" HorizontalAlignment="Stretch" Margin="7,0,5,5" Name="vlblMatched" VerticalAlignment="Center" Grid.Row="8" Content="Matched" Grid.RowSpan="1" HorizontalContentAlignment="Right" />
        <my:VLabel Height="Auto" HorizontalAlignment="Stretch" Margin="0,0,5,5" Name="vlblMatchedTo" VerticalAlignment="Center" Width="Auto" Grid.Column="2" Grid.Row="8" Content="To be Matched" Grid.RowSpan="1" HorizontalContentAlignment="Right" />
        <my:VLabel Height="Auto" HorizontalAlignment="Stretch" Name="vlblDifference" VerticalAlignment="Center" Width="Auto" Grid.Column="4" Grid.Row="8" Content="Difference" IsEnabled="True" Margin="0,0,5,5" Grid.RowSpan="1" HorizontalContentAlignment="Right" />
      
        <my:VLabel Content="Invoice" Height="Auto" HorizontalAlignment="Left" Margin="5,0" Name="vlblInvoice" VerticalAlignment="Top" Width="Auto" Grid.Row="3" Grid.RowSpan="1" />
        <my:VLabel Content="Receipt" Height="Auto" HorizontalAlignment="Left" Name="vlblReceipt" VerticalAlignment="Bottom" Width="Auto" Grid.Row="4" Grid.RowSpan="2" Margin="5,117,0,0" />
        <my:VTextBox HorizontalAlignment="Stretch" IsReadOnly="True" Name="vtxtMatchedTo" VerticalAlignment="Center" Grid.Column="3" Grid.Row="8" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" Margin="0,0,5,5" />
        <my:VDataGrid AutoGenerateColumns="False" Grid.ColumnSpan="7" Grid.Row="4" Height="Auto" HorizontalAlignment="Stretch" Name="vdgvInvoice" VerticalAlignment="Stretch" Width="Auto" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" SelectionChanged="vdgvInvoice_SelectionChanged" ColumnWidth="*" Margin="5,0" />
        <my:VDataGrid AutoGenerateColumns="False" Grid.ColumnSpan="7" Grid.Row="7" HorizontalAlignment="Stretch" Name="vdgvReceipt" VerticalAlignment="Stretch" Width="Auto" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" SelectionChanged="vdgvReceipt_SelectionChanged" ColumnWidth="*" Margin="5,0,5,5" />
        <my:VCheckBox Content="Same BPartner" Height="Auto" HorizontalAlignment="Stretch" Name="vchkSameBPartner" VerticalAlignment="Center" Width="Auto" Grid.Column="4" Grid.Row="5" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" Click="vchkSameBPartner_Click" Grid.ColumnSpan="1" Margin="0,3,5,3" />
        <my:VCheckBox Content="Same Product" Height="Auto" HorizontalAlignment="Stretch" Margin="0,0,5,0" Name="vchkSameProduct" VerticalAlignment="Center" Width="Auto" Grid.Column="5" Grid.Row="5" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" Click="vchkSameProduct_Click" Grid.ColumnSpan="1" />
        <my:VCheckBox Content="Same Quantity" Height="Auto" HorizontalAlignment="Stretch" Name="vchkSameQty" VerticalAlignment="Center" Width="Auto" Grid.Column="7" Grid.Row="5" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" Grid.ColumnSpan="1" Click="vchkSameQty_Click" Margin="0,0,5,0" />
        <my1:VStatusBar Grid.Row="10" HorizontalAlignment="Stretch" x:Name="vStatusBar" VerticalAlignment="Stretch" Grid.ColumnSpan="7" Width="Auto" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" />
        <my:VTextBox HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch" IsReadOnly="True" Margin="0,0,5,5" Name="vtxtDifference" VerticalAlignment="Center" VerticalContentAlignment="Stretch" Grid.Column="5" Grid.Row="8" />
        <my:VTextBox HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch" IsReadOnly="True" Margin="0,0,5,5" Name="vtxtMatched" VerticalAlignment="Center" VerticalContentAlignment="Stretch" Grid.Column="1" Grid.Row="8" />
        
        <my:VImage Content="Process" Grid.Column="6" Grid.Row="8" Height="Auto" HorizontalAlignment="Right" Margin="0,0,7,5" Name="vbtnProcess" VerticalAlignment="Center" Width="68" Click="vbtnProcess_Click" />
    </Grid>
    <Grid x:Name="busyWindow" Opacity=".4" Background="LightGray" Visibility="Collapsed" MouseLeftButtonDown="busyWindow_MouseLeftButtonDown" >
        <TextBlock x:Name="txtBusy" FontSize="20" FontStyle="Italic" Visibility="Collapsed" HorizontalAlignment="Center" Text="Loading...." VerticalAlignment="Center"></TextBlock>
    </Grid>
    </Grid>
</UserControl>
